// Author: wsfuyibing <682805@qq.com>
// Date: 2025-06-12

package responses

import (
	"server/app/http/models"
	"server/app/kind"
)

// ArcadeSettingResponse
// 钓场设置.
type ArcadeSettingResponse struct {
	Id                           int64
	ArcadeId                     kind.ArcadeId
	MemberEarlyEnabled           kind.Enabled
	MemberEarlyEnabledText       string
	MemberEarlyEnabledFlag       string
	MemberEarlyEnabledYes        bool
	MemberEarlyHours             int
	MemberReturnEnabled          kind.Enabled
	MemberReturnEnabledText      string
	MemberReturnEnabledFlag      string
	MemberReturnEnabledYes       bool
	MemberReturnWithCount        float64
	MemberReturnWithWeight       float64
	MemberTicketEnabled          kind.Enabled
	MemberTicketEnabledText      string
	MemberTicketEnabledFlag      string
	MemberTicketEnabledYes       bool
	MemberTicketDiscountType     kind.DiscountType
	MemberTicketDiscountTypeText string
	MemberTicketDiscountAmount   float64
	MemberGoodsEnabled           kind.Enabled
	MemberGoodsEnabledText       string
	MemberGoodsEnabledFlag       string
	MemberGoodsEnabledYes        bool
	MemberGoodsDiscountType      kind.DiscountType
	MemberGoodsDiscountTypeText  string
	MemberGoodsDiscountAmount    float64
}

// With
// 数据绑定.
func (o *ArcadeSettingResponse) With(m *models.ArcadeSetting) *ArcadeSettingResponse {
	o.Id = m.Id
	o.ArcadeId = m.ArcadeId
	o.MemberEarlyEnabled = m.MemberEarlyEnabled
	o.MemberEarlyEnabledText = m.MemberEarlyEnabled.Text()
	o.MemberEarlyEnabledFlag = m.MemberEarlyEnabled.Flag()
	o.MemberEarlyEnabledYes = m.MemberEarlyEnabled.IsYes()
	o.MemberEarlyHours = m.MemberEarlyHours
	o.MemberReturnEnabled = m.MemberReturnEnabled
	o.MemberReturnEnabledText = m.MemberReturnEnabled.Text()
	o.MemberReturnEnabledFlag = m.MemberReturnEnabled.Flag()
	o.MemberReturnEnabledYes = m.MemberReturnEnabled.IsYes()
	o.MemberReturnWithCount = m.MemberReturnWithCount
	o.MemberReturnWithWeight = m.MemberReturnWithWeight
	o.MemberTicketEnabled = m.MemberTicketEnabled
	o.MemberTicketEnabledText = m.MemberTicketEnabled.Text()
	o.MemberTicketEnabledFlag = m.MemberTicketEnabled.Flag()
	o.MemberTicketEnabledYes = m.MemberTicketEnabled.IsYes()
	o.MemberTicketDiscountType = m.MemberTicketDiscountType
	o.MemberTicketDiscountTypeText = m.MemberTicketDiscountType.Text()
	o.MemberTicketDiscountAmount = m.MemberTicketDiscountAmount
	o.MemberGoodsEnabled = m.MemberGoodsEnabled
	o.MemberGoodsEnabledText = m.MemberGoodsEnabled.Text()
	o.MemberGoodsEnabledFlag = m.MemberGoodsEnabled.Flag()
	o.MemberGoodsEnabledYes = m.MemberGoodsEnabled.IsYes()
	o.MemberGoodsDiscountType = m.MemberGoodsDiscountType
	o.MemberGoodsDiscountTypeText = m.MemberGoodsDiscountType.Text()
	o.MemberGoodsDiscountAmount = m.MemberGoodsDiscountAmount
	return o
}
